//密码MD5加密
			function md5(){
				var pwd=$("#mPwd").val();
				var mdpwd=$.md5(pwd);
				$("#mPwd").val(mdpwd);
			}
		//更换验证码图片
	    	function changSrc(url){
	    		var url2 = url+"image/createImage?flag="+Math.random();
	    		$("#img").attr("src",url2); 
	    //		$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    	};
	    	function login(url){
	    		//检查验证码	
	    		var code = $("#code").val();
	    		var userName = $("#mName").val();
	    		var userPwd = $("#mPwd").val();
	    		if(code==""){
	    			$("#msg").html("验证码不能为空！");
	    			$('#mPwd').val("");
	    			$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    		}else{
	    			var reportObj = {"code":code,"userName":userName,"userPwd":userPwd};
	    			var myData = JSON.stringify(reportObj);
	    			$.ajax({
	    				type:"post",
	    				url:url+"check/code",
	    				contentType:"application/json; charset=UTF-8",
	    				dataType:"json",
	    				data:myData,
	    				success:function(resultObj){
	    					$('#mPwd').val("");
	    					if(resultObj.status=='success'){
	    						window.location.href=url+"index";
	    					}else if(resultObj.status=='failed'){
	    						$("#msg").html("用户名或密码错误！");
	    						$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    					}else if(resultObj.status=='null'){
	    						$("#msg").html("验证码不能为空！");
	    						$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    					}else if(resultObj.status=='codeError'){
	    						$("#msg").html("验证码错误！");
	    						$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    					}else if(resultObj.status=='checkError'){
	    						$("#msg").html("用户名或密码不能为空！");
	    						$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    					}else{
	    						alert(resultObj.status);
	    						$("#img").attr("src",url+"image/createImage?flag="+Math.random());
	    					}
	    				},
	    				error:function(){
	    					$("#msg").html("操作错误，请刷新页面");
	    				}
	    			});
	    		}
	    	}